<!DOCTYPE html>
<html lang="cmn-Hans">

<head>
  <title>{{.content}}</title>
  {{template "admin/partials/html-head.html"}}
  <link rel="stylesheet" href="/static/plugins/editor.md/css/editormd.css">
</head>

<body class="hold-transition skin-blue sidebar-mini">
  <div class="wrapper">

    <!-- Main Header -->
    {{template "admin/partials/html-header.html" .}}
    <!-- Left side column. contains the logo and sidebar -->
    {{template "admin/partials/html-menu.html"}}

    <!-- Content Wrapper. Contains page content -->
    <div class="content-wrapper">
      <section class="content-header">
        <h1>
          {{.content}}
        </h1>
        <ol class="breadcrumb">
          <li><a href="#"><i class="fa fa-dashboard"></i> Home</a></li>
          <li class="active">403 error</li>
        </ol>
      </section>
      <section class="content">
        <div class="error-page">
          <h2 class="headline text-yellow"> 403</h2>
          <div class="error-content">
            <h3><i class="fa fa-warning text-yellow"></i>{{.content}}</h3>
            <p>
              若您使用的是访客账号，可尝试注册新账号登陆。
              <a href="/admin/page/register">去注册</a>
            </p>
          </div>
        </div>
      </section>
    </div>
    <!-- /.content-wrapper -->
    {{template "admin/partials/html-footer.html"}}

    <!-- Control Sidebar -->
    {{template "admin/partials/html-control-sidebar.html"}}
    <!-- /.control-sidebar -->

  </div>
  <!-- ./wrapper -->
  <!-- REQUIRED JS SCRIPTS -->
  {{template "admin/partials/html-js.html"}}
  <!-- Bootstrap WYSIHTML5 -->
  <script src="../../static/plugins/editor.md/editormd.min.js"></script>
  <!-- /REQUIRED JS SCRIPTS -->

  <!-- page script -->
  <script type="text/javascript">
    var testEditor;
    $(function () {
      mdtestEditor = editormd("art_div", {
        width: "100%",
        height: 500,
        syncScrolling: "single",
        path: "/static/plugins/editor.md/lib/",
        imageUpload: true,
        imageFormats: ["jpg", "jpeg", "gif", "png", "bmp", "webp"],
        imageUploadURL: "/admin/api/upload-img",//上传图片接口
        /*
        上传的后台只需要返回一个 JSON 数据，结构如下：
        {
        success : 0 | 1,           // 0 表示上传失败，1 表示上传成功
        message : "提示的信息，上传成功或上传失败及错误信息等。",
        url     : "图片地址"        // 上传成功时才返回
        }
        */

      });
      mdtestEditor.setToolbarAutoFixed(false);

      $(".J-submit").on("click", function () {
        var title = $("#art_title").val();
        var content = $("#art_content").val();
        var category = $("#art_category").val();
        var keywords = $("#art_keywords").val();
        $.post("/admin/api/article", { title: title, content: content, category: category, keywords: keywords }, function (result) {
          if (result.code == 0) {
            // layer.msg("新建成功！", { icon: 6 });
            location.href = "/admin/page/article-list"
          } else {
            layer.msg("新建失败！" + result.msg, { icon: 5 });
          }
        }, "json");
      })
    });
  </script>
</body>

</html>